<!--
 * @Descripttion:
 * @version:
 * @Author: 周子尧
 * @Date: 2021-01-27 11:21:27
 * @LastEditors: 周子尧
 * @LastEditTime: 2021-02-04 15:37:30
-->
<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <div>日期函数使用:moment('20111031', 'YYYYMMDD').fromNow()=>{{ $moment('20111031', 'YYYYMMDD').fromNow() }}</div>
    <div>参数解析https://www.baidu.com?a=1&b=2&c=3=>{{ param2Obj('https://www.baidu.com?a=1&b=2&c=3') }}</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import { param2Obj } from '@/utils'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  created() {
  },
  methods: {
    param2Obj
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
